<%
	/* 是否是数字字符串 */
	function IsNumeric($value,$type)
	{
		var boolValue=(isNaN($value)==true ? false:true);
		var numberEnum=['int','integer','float','real','positive','negative','nil','zero'];
			if($type!=undefined&&numberEnum.indexOf($type)!=-1)
			{			      
				$type=String($type).toLowerCase();
				$value=Number($value);
				if($type=='int'||$type=='integer')
				{
					boolValue=$value.isInteger();
				}
				else if($type=='float'||$type=='real')
				{
					boolValue=$value.isFloat();
				}
				else if($type=='positive')
				{
					boolValue=$value.isPositive();
				}
				else if($type=='negative')
				{
					boolValue=$value.isNegative();
				}
				else if($type=='nil'||$type=='zero')
				{
					boolValue=($value==0);
				}
			}
		return boolValue;
	};
	function isNumeric($value,$type) {return IsNumeric.call(this,$value,$type)};
	/* 返回数据类型 */
/*	function VarType($var)
	{
		//number,bool,string,array,date,json,function,undefined		
		var variableType=typeof($var);
		if(variableType=='object')
		{
			var tempValue;
			try
			{
				tempValue=$var.constructor;
			}
			catch(e)
			{
				tempValue=variableType;
			}
			switch(tempValue)
			{
				case Object:
					variableType='object';	
					break;				
				case String:
					variableType='string';
					break;				
				case Number:
					variableType='number';
					break;	
				case Boolean:
					variableType='boolean';
					break;		
				case Function:
					variableType='function';
					break;						
				case Array:
					variableType='array';
					break;
				case Date:
					variableType='date';
					break;				
				case Enumerator:
					variableType='enumerator';
					break;
				case RegExp:
					variableType='regexp';
					break;
				case VBArray:
					variableType='VBArray';
					break;					
				case Error:
					variableType='object';
					break;					
				default:
					variableType='object';	//unbeknow
			}
		}
		return variableType;
	};	
	function varType($var){return VarType($var)};
	*/
	/* 返回现在时间 */
	function Now()
	{
		return (new Date()).toCommString();
	};
	function now(){return Now()};
	/* 将对象转换成数组 */
	function $A($iterable) 
	{
		if(!$iterable) return [];
		if($iterable.toArray) return $iterable.toArray();
		var length=$iterable.length,results=new Array(length);
		while(length--) 
		{
			results[length]=$iterable[length];
		}
		return results;
	};	
	/* 将以空格作为分隔的字符串转换成数组 */
	function $W($string) 
	{
		if(!Object.isString($string)) return [];
			$string=$string.strip();
		return $string ? $string.split(/\s+/):[];
	}	
	function $w($string)
	{
		return $W($string);
	}
	/* 返回Hash对象 */	
	function $H($object) 
	{
		return new Hash($object);
	}
	/* 批量执行函数 */
	var Try=
	{
		these:function() 
		{
			var returnValue;		
			for(var i=0,length=arguments.length;i< length;i++) 
			{
				var lambda=arguments[i];
				try 
				{
					returnValue = lambda();
					break;
				} 
				catch(e){}
			}		
			return returnValue;
		}
	};		
%>